define("newweb/common/service", ["./utils", "./md5", "./jquery-1.7"], function (e, t) {
    var n = e("./jquery-1.7");
    e("./utils");
    e("./md5");
    var r = function (e) {
        var t = n.md5(navigator.appVersion)
            , r = "" + (new Date).getTime()
            , i = r + parseInt(10 * Math.random(), 10);
        return {
            ts: r,
            bv: t,
            salt: i,
            sign: n.md5("fanyideskweb" + e + i + "n%A-rKaT5fb[Gy?;N5@Tj")
        }
    };
    t.translate = function (e, t) {
        _ = f("#language").val();
        var n = x.val()
            , r = g.generateSaltSign(n)
            , i = n.length;
        if (F(),
            T.text(i),
        i > 5e3) {
            var a = n;
            n = a.substr(0, 5e3),
                r = g.generateSaltSign(n);
            var s = a.substr(5e3);
            s = (s = s.trim()).substr(0, 3),
                f("#inputTargetError").text("有道翻译字数限制为5000字，“" + s + "”及其后面没有被翻译!").show(),
                T.addClass("fonts__overed")
        } else
            T.removeClass("fonts__overed"),
                f("#inputTargetError").hide();
        d.isWeb(n) ? o() : l({
            i: n,
            from: C,
            to: S,
            smartresult: "dict",
            client: k,
            salt: r.salt,
            sign: r.sign,
            ts: r.ts,
            bv: r.bv,
            doctype: "json",
            version: "2.1",
            keyfrom: "fanyi.web",
            action: e || "FY_BY_DEFAULT"
        }, t)
    }
        ,
        t.showResult = s
});
